Another trivial cleanup. This is in preparation for next commit, that
will expand on this if clause, and will make it a bit more complicated.
Using a variable here makes it easier to read.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1866>
if (!currentDraggable &&
(Math.abs(stageX - this._dragStartX) > threshold ||
Math.abs(stageY - this._dragStartY) > threshold)) {
- if ((event.get_time() - this._dragStartTime) > this._dragTimeoutThreshold) {
+ const ellapsedTime = event.get_time() - this._dragStartTime;
+
+ if (ellapsedTime > this._dragTimeoutThreshold) {
this.startDrag(stageX, stageY, event.get_time(), this._touchSequence, event.get_device());
this._updateDragPosition(event);
} else {